<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>事件对象的使用</title>
        <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
    </head>

    <body>
        <input type="text"
        placeholder="原生Js事件",
        oninput="jsEvent('123',event)"
        >
        <div id="root">
            <p>{{title}}</p>
            <input
                type="text"
                placeholder="vue事件"
                v-on:input="vueEvent($event)"
            />
        </div>

       <script>
        function jsEvent(num,e) {
            console.log(num,e);
        }
        new Vue({
            el:'#root',
            data:{
                title:'vue111',
            },
            methods:{
                vueEvent(e) {
                    console.log(e.target.value)
                }
            },
        });
       </script>
    </body>
</html>
